<?php

$installer = $this;

$installer->startSetup();

$installer->run("

DROP TABLE IF EXISTS `rumall_vendor_announcement_type`;
create table rumall_vendor_announcement_type(
	type_id int unsigned key auto_increment,
	name varchar(255) not null comment '公告类型',
	del_flag tinyint unsigned not null default 0 comment '删除标记：0-未删除 1-已删除'
)engine=innodb default charset=utf8 comment '公告类型表';


DROP TABLE IF EXISTS `rumall_vendor_announcement`;
create table rumall_vendor_announcement(
	id int unsigned key auto_increment,
	create_by varchar(50) not null default '' comment '创建人账号',
	edit_by varchar(50) not null default '' comment '修改人账号',
	is_top tinyint unsigned not null default 0 comment '是否置顶',
	type_id tinyint unsigned not null default 0 comment '公告类型',
	title varchar(255) not null default '' comment '公告标题',
	content text not null comment '公告内容',
	create_time int unsigned not null default 0 comment '发布时间(时间戳)',
	edit_time int unsigned not null default 0 comment '修改时间(时间戳)',
	for_all tinyint unsigned not null default 1 comment '是否面向全体商家',
	for_vendors text not null comment '公告特定商家的ID,存储格式：1,2,3',
	status tinyint unsigned not null default 0 comment '公告状态',
	key (type_id)
)engine=innodb default charset=utf8 comment '公告表';


");

$installer->endSetup(); 